/*
 * Copyright (C) 2018 xuexiangjys(xuexiangjys@163.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.xuexiang.xdlinkdemo.device;

/**
 * 常量
 * @author xuexiang
 * @since 2018/9/3 下午8:31
 */
public final class Constants {

    public static final int CHAT_SERVER_PORT = 1234;

    /**
     * 设备类型
     */
    public static final class DeviceType {

        public static final String CHAT_CLIENT = "chat_client";
        public static final String CHAT_SERVER = "chat_server";
    }

    /**
     * 功能码
     */
    public static final class FunctionCode {

        public static final byte CLIENT_JSON_REQUEST = 0x11;

        public static final byte CLIENT_JSON_RESPONSE = 0x12;



        public static final byte SERVER_JSON_REQUEST = 0x12;

        public static final byte SERVER_JSON_RESPONSE = 0x11;
    }


    public static final class ChatStatus {

        public static final int CONNECT_SUCCESS = 1000;
        public static final int CONNECT_FAILED = 1001;
    }

    /**
     * 接口类型
     */
    public static final class ApiType {

        public static final String LOGIN = "login";

        public static final String SEND_MESSAGE = "send_message";
    }
}
